<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: AESCounter&lt; S &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_a_e_s_counter.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_a_e_s_counter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">AESCounter&lt; S &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Generic AES Counter class.  
 <a href="class_a_e_s_counter.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="apps_2elftosb_2common_2_a_e_s_counter_8h_source.html">AESCounter.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for AESCounter&lt; S &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_a_e_s_counter__inherit__graph.svg" width="138" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for AESCounter&lt; S &gt;:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_a_e_s_counter__coll__graph.svg" width="199" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a848dd319c5f4827c1f4e993eebfc34ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a848dd319c5f4827c1f4e993eebfc34ad"></a>
typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a>[S/8]</td></tr>
<tr class="memdesc:a848dd319c5f4827c1f4e993eebfc34ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for this size of AES counter. <br /></td></tr>
<tr class="separator:a848dd319c5f4827c1f4e993eebfc34ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a848dd319c5f4827c1f4e993eebfc34ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a848dd319c5f4827c1f4e993eebfc34ad"></a>
typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a>[S/8]</td></tr>
<tr class="memdesc:a848dd319c5f4827c1f4e993eebfc34ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for this size of AES counter. <br /></td></tr>
<tr class="separator:a848dd319c5f4827c1f4e993eebfc34ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aae720e7397ae4eaf3aa704cf8ed9f68a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#aae720e7397ae4eaf3aa704cf8ed9f68a">AESCounter</a> ()</td></tr>
<tr class="memdesc:aae720e7397ae4eaf3aa704cf8ed9f68a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#aae720e7397ae4eaf3aa704cf8ed9f68a">More...</a><br /></td></tr>
<tr class="separator:aae720e7397ae4eaf3aa704cf8ed9f68a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7ee161f307b1ee8bc57bed4bf06e039"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7ee161f307b1ee8bc57bed4bf06e039"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#ac7ee161f307b1ee8bc57bed4bf06e039">AESCounter</a> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;counter)</td></tr>
<tr class="memdesc:ac7ee161f307b1ee8bc57bed4bf06e039"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor taking a counter value reference. <br /></td></tr>
<tr class="separator:ac7ee161f307b1ee8bc57bed4bf06e039"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf7627ff74d8ee5397133285d760b57"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3cf7627ff74d8ee5397133285d760b57"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>AESCounter</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter)</td></tr>
<tr class="separator:a3cf7627ff74d8ee5397133285d760b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afac54c3ec124ed4f7c263da20e3d4b9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afac54c3ec124ed4f7c263da20e3d4b9d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#afac54c3ec124ed4f7c263da20e3d4b9d">AESCounter</a> (std::istream &amp;stream)</td></tr>
<tr class="memdesc:afac54c3ec124ed4f7c263da20e3d4b9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, reads counter from stream in hex format. <br /></td></tr>
<tr class="separator:afac54c3ec124ed4f7c263da20e3d4b9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a3d191b83573b2f9d383b327ba4036a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a3d191b83573b2f9d383b327ba4036a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a0a3d191b83573b2f9d383b327ba4036a">AESCounter</a> (const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;other)</td></tr>
<tr class="memdesc:a0a3d191b83573b2f9d383b327ba4036a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <br /></td></tr>
<tr class="separator:a0a3d191b83573b2f9d383b327ba4036a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada7d31d65c1ee41dbf674495a41024b1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#ada7d31d65c1ee41dbf674495a41024b1">~AESCounter</a> ()</td></tr>
<tr class="memdesc:ada7d31d65c1ee41dbf674495a41024b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ada7d31d65c1ee41dbf674495a41024b1">More...</a><br /></td></tr>
<tr class="separator:ada7d31d65c1ee41dbf674495a41024b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26809d210258caae20cab5c4687da55c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26809d210258caae20cab5c4687da55c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a26809d210258caae20cab5c4687da55c">randomize</a> ()</td></tr>
<tr class="memdesc:a26809d210258caae20cab5c4687da55c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to the counter to a randomly generated value. <br /></td></tr>
<tr class="separator:a26809d210258caae20cab5c4687da55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29f14b6459f22f6573cbb61155fe7db7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a29f14b6459f22f6573cbb61155fe7db7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a29f14b6459f22f6573cbb61155fe7db7">readFromStream</a> (std::istream &amp;stream)</td></tr>
<tr class="memdesc:a29f14b6459f22f6573cbb61155fe7db7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the counter from a hex encoded data stream. <br /></td></tr>
<tr class="separator:a29f14b6459f22f6573cbb61155fe7db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7fa3786d8b60eaaa0f7e95961422462"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7fa3786d8b60eaaa0f7e95961422462"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#ab7fa3786d8b60eaaa0f7e95961422462">writeToStream</a> (std::ostream &amp;stream) const </td></tr>
<tr class="memdesc:ab7fa3786d8b60eaaa0f7e95961422462"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the counter to a data stream in hex encoded format. <br /></td></tr>
<tr class="separator:ab7fa3786d8b60eaaa0f7e95961422462"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a8f2a4a6bcdb99babba4bcdb7c24b36"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a8f2a4a6bcdb99babba4bcdb7c24b36"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a6a8f2a4a6bcdb99babba4bcdb7c24b36">incrementCounter</a> (unsigned val)</td></tr>
<tr class="memdesc:a6a8f2a4a6bcdb99babba4bcdb7c24b36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increments the counter by val. <br /></td></tr>
<tr class="separator:a6a8f2a4a6bcdb99babba4bcdb7c24b36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae720e7397ae4eaf3aa704cf8ed9f68a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#aae720e7397ae4eaf3aa704cf8ed9f68a">AESCounter</a> ()</td></tr>
<tr class="memdesc:aae720e7397ae4eaf3aa704cf8ed9f68a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#aae720e7397ae4eaf3aa704cf8ed9f68a">More...</a><br /></td></tr>
<tr class="separator:aae720e7397ae4eaf3aa704cf8ed9f68a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7ee161f307b1ee8bc57bed4bf06e039"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7ee161f307b1ee8bc57bed4bf06e039"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#ac7ee161f307b1ee8bc57bed4bf06e039">AESCounter</a> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;counter)</td></tr>
<tr class="memdesc:ac7ee161f307b1ee8bc57bed4bf06e039"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor taking a counter value reference. <br /></td></tr>
<tr class="separator:ac7ee161f307b1ee8bc57bed4bf06e039"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf7627ff74d8ee5397133285d760b57"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3cf7627ff74d8ee5397133285d760b57"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>AESCounter</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter)</td></tr>
<tr class="separator:a3cf7627ff74d8ee5397133285d760b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afac54c3ec124ed4f7c263da20e3d4b9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afac54c3ec124ed4f7c263da20e3d4b9d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#afac54c3ec124ed4f7c263da20e3d4b9d">AESCounter</a> (std::istream &amp;stream)</td></tr>
<tr class="memdesc:afac54c3ec124ed4f7c263da20e3d4b9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, reads counter from stream in hex format. <br /></td></tr>
<tr class="separator:afac54c3ec124ed4f7c263da20e3d4b9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a3d191b83573b2f9d383b327ba4036a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a3d191b83573b2f9d383b327ba4036a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a0a3d191b83573b2f9d383b327ba4036a">AESCounter</a> (const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;other)</td></tr>
<tr class="memdesc:a0a3d191b83573b2f9d383b327ba4036a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <br /></td></tr>
<tr class="separator:a0a3d191b83573b2f9d383b327ba4036a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada7d31d65c1ee41dbf674495a41024b1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#ada7d31d65c1ee41dbf674495a41024b1">~AESCounter</a> ()</td></tr>
<tr class="memdesc:ada7d31d65c1ee41dbf674495a41024b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ada7d31d65c1ee41dbf674495a41024b1">More...</a><br /></td></tr>
<tr class="separator:ada7d31d65c1ee41dbf674495a41024b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26809d210258caae20cab5c4687da55c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26809d210258caae20cab5c4687da55c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a26809d210258caae20cab5c4687da55c">randomize</a> ()</td></tr>
<tr class="memdesc:a26809d210258caae20cab5c4687da55c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to the counter to a randomly generated value. <br /></td></tr>
<tr class="separator:a26809d210258caae20cab5c4687da55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29f14b6459f22f6573cbb61155fe7db7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a29f14b6459f22f6573cbb61155fe7db7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a29f14b6459f22f6573cbb61155fe7db7">readFromStream</a> (std::istream &amp;stream)</td></tr>
<tr class="memdesc:a29f14b6459f22f6573cbb61155fe7db7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the counter from a hex encoded data stream. <br /></td></tr>
<tr class="separator:a29f14b6459f22f6573cbb61155fe7db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7fa3786d8b60eaaa0f7e95961422462"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7fa3786d8b60eaaa0f7e95961422462"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#ab7fa3786d8b60eaaa0f7e95961422462">writeToStream</a> (std::ostream &amp;stream) const </td></tr>
<tr class="memdesc:ab7fa3786d8b60eaaa0f7e95961422462"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the counter to a data stream in hex encoded format. <br /></td></tr>
<tr class="separator:ab7fa3786d8b60eaaa0f7e95961422462"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a8f2a4a6bcdb99babba4bcdb7c24b36"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a8f2a4a6bcdb99babba4bcdb7c24b36"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a6a8f2a4a6bcdb99babba4bcdb7c24b36">incrementCounter</a> (unsigned val)</td></tr>
<tr class="memdesc:a6a8f2a4a6bcdb99babba4bcdb7c24b36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increments the counter by val. <br /></td></tr>
<tr class="separator:a6a8f2a4a6bcdb99babba4bcdb7c24b36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Counter accessors</div></td></tr>
<tr class="memitem:a1457ff3a7d2e4cd2bbab058b429a9e9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1457ff3a7d2e4cd2bbab058b429a9e9d"></a>
const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getCounter</b> () const </td></tr>
<tr class="separator:a1457ff3a7d2e4cd2bbab058b429a9e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67739b1717f24f9677b967d87c6dc648"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67739b1717f24f9677b967d87c6dc648"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>getCounter</b> (<a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter) const </td></tr>
<tr class="separator:a67739b1717f24f9677b967d87c6dc648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45509ea3b80f2a4bee3c8ab7a7d4f511"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45509ea3b80f2a4bee3c8ab7a7d4f511"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCounter</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;counter)</td></tr>
<tr class="separator:a45509ea3b80f2a4bee3c8ab7a7d4f511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7272c91ee53b84e94bd335d0961bbf17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7272c91ee53b84e94bd335d0961bbf17"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCounter</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter)</td></tr>
<tr class="separator:a7272c91ee53b84e94bd335d0961bbf17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76705d8d9f5a60e9449e57d0efdf05ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76705d8d9f5a60e9449e57d0efdf05ce"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCounter</b> (const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;counter)</td></tr>
<tr class="separator:a76705d8d9f5a60e9449e57d0efdf05ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1457ff3a7d2e4cd2bbab058b429a9e9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1457ff3a7d2e4cd2bbab058b429a9e9d"></a>
const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getCounter</b> () const </td></tr>
<tr class="separator:a1457ff3a7d2e4cd2bbab058b429a9e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67739b1717f24f9677b967d87c6dc648"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67739b1717f24f9677b967d87c6dc648"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>getCounter</b> (<a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter) const </td></tr>
<tr class="separator:a67739b1717f24f9677b967d87c6dc648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45509ea3b80f2a4bee3c8ab7a7d4f511"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45509ea3b80f2a4bee3c8ab7a7d4f511"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCounter</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;counter)</td></tr>
<tr class="separator:a45509ea3b80f2a4bee3c8ab7a7d4f511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7272c91ee53b84e94bd335d0961bbf17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7272c91ee53b84e94bd335d0961bbf17"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCounter</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter)</td></tr>
<tr class="separator:a7272c91ee53b84e94bd335d0961bbf17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76705d8d9f5a60e9449e57d0efdf05ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76705d8d9f5a60e9449e57d0efdf05ce"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCounter</b> (const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;counter)</td></tr>
<tr class="separator:a76705d8d9f5a60e9449e57d0efdf05ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_a_e_s_counter_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_a_e_s_counter_base')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_a_e_s_counter_base.html">AESCounterBase</a></td></tr>
<tr class="memitem:acfea7055ca20fc658ee9616b55e970f2 inherit pub_methods_class_a_e_s_counter_base"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter_base.html#acfea7055ca20fc658ee9616b55e970f2">_readFromStream</a> (std::istream &amp;stream, unsigned bytes, uint8_t *buffer)</td></tr>
<tr class="memdesc:acfea7055ca20fc658ee9616b55e970f2 inherit pub_methods_class_a_e_s_counter_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads hex encoded data from <em>stream</em>.  <a href="#acfea7055ca20fc658ee9616b55e970f2">More...</a><br /></td></tr>
<tr class="separator:acfea7055ca20fc658ee9616b55e970f2 inherit pub_methods_class_a_e_s_counter_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfaa4964e03622a762b8a5886069e5bd inherit pub_methods_class_a_e_s_counter_base"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter_base.html#adfaa4964e03622a762b8a5886069e5bd">_writeToStream</a> (std::ostream &amp;stream, unsigned bytes, const uint8_t *buffer) const </td></tr>
<tr class="memdesc:adfaa4964e03622a762b8a5886069e5bd inherit pub_methods_class_a_e_s_counter_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes hex encoded data to <em>stream</em>.  <a href="#adfaa4964e03622a762b8a5886069e5bd">More...</a><br /></td></tr>
<tr class="separator:adfaa4964e03622a762b8a5886069e5bd inherit pub_methods_class_a_e_s_counter_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfea7055ca20fc658ee9616b55e970f2 inherit pub_methods_class_a_e_s_counter_base"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acfea7055ca20fc658ee9616b55e970f2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter_base.html#acfea7055ca20fc658ee9616b55e970f2">_readFromStream</a> (std::istream &amp;stream, unsigned bytes, uint8_t *buffer)</td></tr>
<tr class="memdesc:acfea7055ca20fc658ee9616b55e970f2 inherit pub_methods_class_a_e_s_counter_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads hex encoded data from <em>stream</em>. <br /></td></tr>
<tr class="separator:acfea7055ca20fc658ee9616b55e970f2 inherit pub_methods_class_a_e_s_counter_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfaa4964e03622a762b8a5886069e5bd inherit pub_methods_class_a_e_s_counter_base"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adfaa4964e03622a762b8a5886069e5bd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter_base.html#adfaa4964e03622a762b8a5886069e5bd">_writeToStream</a> (std::ostream &amp;stream, unsigned bytes, const uint8_t *buffer) const </td></tr>
<tr class="memdesc:adfaa4964e03622a762b8a5886069e5bd inherit pub_methods_class_a_e_s_counter_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes hex encoded data to <em>stream</em>. <br /></td></tr>
<tr class="separator:adfaa4964e03622a762b8a5886069e5bd inherit pub_methods_class_a_e_s_counter_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a3aab6ec872dd97f0c65ebb023d08f324"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3aab6ec872dd97f0c65ebb023d08f324"></a>
<a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_e_s_counter.html#a3aab6ec872dd97f0c65ebb023d08f324">m_counter</a></td></tr>
<tr class="memdesc:a3aab6ec872dd97f0c65ebb023d08f324"><td class="mdescLeft">&#160;</td><td class="mdescRight">The counter value. <br /></td></tr>
<tr class="separator:a3aab6ec872dd97f0c65ebb023d08f324"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Operators</h2></td></tr>
<tr class="memitem:add46cc632dd1b03c498c2b173f8c25d0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add46cc632dd1b03c498c2b173f8c25d0"></a>
const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;counter)</td></tr>
<tr class="separator:add46cc632dd1b03c498c2b173f8c25d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ba7bae61babbedc62e91a18e4674d2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ba7bae61babbedc62e91a18e4674d2f"></a>
const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;counter)</td></tr>
<tr class="separator:a5ba7bae61babbedc62e91a18e4674d2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c5ab76dba67855df9352c586ef89c79"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c5ab76dba67855df9352c586ef89c79"></a>
const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter)</td></tr>
<tr class="separator:a5c5ab76dba67855df9352c586ef89c79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa38cc06b96cc1ed073eea1190022cab9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa38cc06b96cc1ed073eea1190022cab9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator const counter_t &amp;</b> () const </td></tr>
<tr class="separator:aa38cc06b96cc1ed073eea1190022cab9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaf50d80a3f3807c716f478b9c96fe6e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeaf50d80a3f3807c716f478b9c96fe6e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator const counter_t *</b> () const </td></tr>
<tr class="separator:aeaf50d80a3f3807c716f478b9c96fe6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add46cc632dd1b03c498c2b173f8c25d0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add46cc632dd1b03c498c2b173f8c25d0"></a>
const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;counter)</td></tr>
<tr class="separator:add46cc632dd1b03c498c2b173f8c25d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ba7bae61babbedc62e91a18e4674d2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ba7bae61babbedc62e91a18e4674d2f"></a>
const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> &amp;counter)</td></tr>
<tr class="separator:a5ba7bae61babbedc62e91a18e4674d2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c5ab76dba67855df9352c586ef89c79"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c5ab76dba67855df9352c586ef89c79"></a>
const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad">counter_t</a> *counter)</td></tr>
<tr class="separator:a5c5ab76dba67855df9352c586ef89c79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa38cc06b96cc1ed073eea1190022cab9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa38cc06b96cc1ed073eea1190022cab9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator const counter_t &amp;</b> () const </td></tr>
<tr class="separator:aa38cc06b96cc1ed073eea1190022cab9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaf50d80a3f3807c716f478b9c96fe6e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeaf50d80a3f3807c716f478b9c96fe6e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator const counter_t *</b> () const </td></tr>
<tr class="separator:aeaf50d80a3f3807c716f478b9c96fe6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7a84fe2f280368a7597a197855e92a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7a84fe2f280368a7597a197855e92a3"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;os, const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;counter)</td></tr>
<tr class="separator:ad7a84fe2f280368a7597a197855e92a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7a84fe2f280368a7597a197855e92a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7a84fe2f280368a7597a197855e92a3"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;os, const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt; &amp;counter)</td></tr>
<tr class="separator:ad7a84fe2f280368a7597a197855e92a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;int S&gt;<br />
class AESCounter&lt; S &gt;</h3>

<p>Generic AES Counter class. </p>
<p>The template parameter <em>S</em> is the number of bits in the counter.</p>
<p>The underlying counter type can be accessed like this: <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad" title="Type for this size of AES counter. ">AESCounter&lt;128&gt;::counter_t</a></p>
<p>When a counter instance is destroyed, it erases the counter data by setting it to all zeroes.</p>
<p><a class="el" href="class_a_e_s_counter.html">AESCounter&lt;128&gt;</a> counter = AESCounter&lt;128&gt;::readFromStream(s);</p>
<p>The template parameter <em>S</em> is the number of bits in the counter.</p>
<p>The underlying counter type can be accessed like this: <a class="el" href="class_a_e_s_counter.html#a848dd319c5f4827c1f4e993eebfc34ad" title="Type for this size of AES counter. ">AESCounter&lt;128&gt;::counter_t</a></p>
<p>When a counter instance is destroyed, it erases the counter data by setting it to all zeroes.</p>
<p><a class="el" href="class_a_e_s_counter.html">AESCounter&lt;128&gt;</a> counter = AESCounter&lt;128&gt;::readFromStream(s); </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aae720e7397ae4eaf3aa704cf8ed9f68a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int S&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt;::<a class="el" href="class_a_e_s_counter.html">AESCounter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>Initializes the counter to 0. </p>

</div>
</div>
<a class="anchor" id="ada7d31d65c1ee41dbf674495a41024b1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int S&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt;::~<a class="el" href="class_a_e_s_counter.html">AESCounter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Sets the counter value to zero. </p>

</div>
</div>
<a class="anchor" id="aae720e7397ae4eaf3aa704cf8ed9f68a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int S&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt;::<a class="el" href="class_a_e_s_counter.html">AESCounter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>Initializes the counter to 0. </p>

</div>
</div>
<a class="anchor" id="ada7d31d65c1ee41dbf674495a41024b1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int S&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; S &gt;::~<a class="el" href="class_a_e_s_counter.html">AESCounter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Sets the counter value to zero. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="apps_2elftosb_2common_2_a_e_s_counter_8h_source.html">apps/elftosb/common/AESCounter.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_a_e_s_counter.html">AESCounter</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
